package com.mcarrot.site.action;

import java.io.IOException;
import java.io.PrintWriter;

import net.sf.json.JSONObject;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class AdminAction extends BaseAction{

	private static final long serialVersionUID = -3743498878137668747L;
	
	private String userName;
	private String password;
	
	private final Log log = LogFactory.getLog(getClass());
	
	public String forward(){
		return SUCCESS;
	}
	
	public void login(){
		try {
			JSONObject jsonObject = new JSONObject();  
			jsonObject.accumulate("success", true);
			PrintWriter pw = getResponse().getWriter();
			pw.write(jsonObject.toString());
		} catch (IOException e) {
			e.printStackTrace();
			log.error(getClass().getName() + "--->", e);
		} catch (Exception e) {
			e.printStackTrace();
			log.error(getClass().getName() + "--->", e);
		}
		
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

}
